#!/usr/bin/env python
# -*- coding: utf-8 -*-

# @Time     :2020/10/26
# @Author   :Changshu
# @File     :Exercise_392.py
# 392. 判断子序列
# 给定字符串 s 和 t ，判断 s 是否为 t 的子序列。

def isSubsequence(s: str, t: str) -> bool:
	n1,n2=len(s),len(t)
	i,j=0,0
	while i<n1 and j<n2:
		if s[i]==t[j]:
			i+=1
		j+=1
	return i==n1
if __name__ == '__main__':
	s='axc'
	t='ahbxgdc'
	print(isSubsequence(s,t))
